package com.project.service;

import com.project.entity.KnowLedge;
import com.project.mapper.KnowLedgeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KnowLedgeService {
    @Autowired
    private KnowLedgeMapper knowledgeMapper;

    public List<KnowLedge> findPage(Integer pageIndex, Integer pageItemCount){

        Integer first = (pageIndex-1)*pageItemCount;

        return knowledgeMapper.findPage(first,pageItemCount);
    }

    //根据id查询农业对象
    public KnowLedge findOneById(Integer id){
        return knowledgeMapper.findOneById(id);
    }

}
